package com.xy.absfactory.order;


import com.xy.absfactory.pizza.LDCheesePizza;
import com.xy.absfactory.pizza.LDGreekPizza;
import com.xy.absfactory.pizza.Pizza;

/**
 * @author 谢阳
 * @version 1.8.0_131
 * @date 2022/6/10 11:04
 * @description
 */
public class LDOrderPizzaFactory implements AbsFactory {
    @Override
    public Pizza createPizza(String orderType) {
        if (orderType.equals("cheese"))
            return new LDCheesePizza();
        else if (orderType.equals("greek"))
            return new LDGreekPizza();
        return null;
    }
}
